import Vue from "vue";
import VueRouter from "vue-router";
// import HomeView from '../views/HomeView.vue'

import Home from '../pages/Home'
import ServeList from '../pages/wmz/ServeList.vue'
import Follow from '../pages/wmz/follow.vue'
import Recharge from '../pages/wmz/recharge.vue'
import HomeCleaningOrder from '../pages/home/serve/HomeCleaningOrder.vue'
import HomeMaintain from '../pages/home/itme/Maintain.vue'
import xitongxiaoxi from "../pages/news/xitongxiaoxi.vue";
import shenghuohao from "../pages/news/shenghuohao.vue";
import youhuicuxiao from "../pages/news/youhuicuxiao.vue";
import Start from '../pages/yindao/qidong.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/start",
  },
  {
    path:"/start",
    component:Start
  },
  {
    path: "/home",
    component: Home,
    children: [
      {
        path: "homes",
        component: () =>
          import(/* webpackChunkName: "homes" */ "../pages/home/Homes.vue"),
      },
      {
        path: "serve",
        component: () =>
          import(/* webpackChunkName: "list" */ "../pages/home/Serve.vue"),
      },
      {
        path: "message",
        component: () =>
          import(/* webpackChunkName: "message" */ "../pages/home/Message.vue"),
      },
      {
        path: "my",
        component: () =>
          import(/* webpackChunkName: "message" */ "../pages/home/My.vue"),
      },
    ],
  },
  {
    path: "/payment",
    component: () => import("../pages/jiaofei/Payment.vue"),
  },
  {
    path: "/set",
    component: () => import("../pages/set/Set.vue"),
  },
  {
    path: "/addaddress",
    component: () => import("../pages/set/AddAddress.vue"),
  },
  {
    path: "/magaddress",
    component: () => import("../pages/set/MagAddress.vue"),
  },
  {
    path: "/aboutour",
    component: () => import("../pages/set/AboutOur.vue"),
  },
  {
    path: "/person",
    component: () => import("../pages/set/Person.vue"),
  },
  // wmz
  {
    path: "/servelist/:id?",
    // path:"/servelist"
    component: ServeList,
  },
  {
    path:"/recharge/:id?",
    component:Recharge
  },

  {
    path: "/follow",
    component: Follow,
  },
  // wmz
  

  {
    // ! 上门维修详情页
    path: "/itme/homemaintain/:id?",
    component:HomeMaintain,
  },
  {
    // ! 家庭保洁下单页
    path: "/home/serve/order/:id?",
    component: HomeCleaningOrder,
  },
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
  {
    path: "/shenghuohao",
    name: "shenghuohao",
    component: () =>
      import(
        /* webpackChunkName: "shenghuohao" */ "../pages/news/shenghuohao.vue"
      ),
  },
  {
    path: "/xitongxiaoxi",
    name: "xitongxiaoxi",
    component: () =>
      import(
        /* webpackChunkName: "shenghuohao" */ "../pages/news/xitongxiaoxi.vue"
      ),
  },
  {
    path: "/youhuicuxiao",
    name: "youhuicuxiao",
    component: () =>
      import(
        /* webpackChunkName: "shenghuohao" */ "../pages/news/youhuicuxiao.vue"
      ),
  },
  {
    path: "/denglu",
    name: "denglu",
    component: () =>
      import(/* webpackChunkName: "denglu" */ "../pages/yindao/denglu.vue"),
  },
  {
    path: "/qidong",
    component: () =>
      import(/* webpackChunkName: "my" */ "../pages/yindao/qidong.vue"),
  },
  {
    path: "/yindao",
    component: () =>
      import(/* webpackChunkName: "my" */ "../pages/yindao/yindao.vue"),
  },
  {
    path: "/zhuce",
    component: () =>
      import(/* webpackChunkName: "my" */ "../pages/yindao/zhuce.vue"),
  },
  {
    path: "/xieyi",
    component: () => import("../pages/yinsi/xieyi.vue"),
  },
  {
    path: "/yinsi",
    component: () =>
      import(/* webpackChunkName: "my" */ "../pages/yinsi/yinsi.vue"),
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
